<?php include_once ('./templates/header.html'); ?>
<script language="javascript" type="text/javascript">
	$(document).ready(function(){
		$("input[type='text']").addClass("input_blur").mouseover(function(){ $(this).addClass("input_focus");}).mouseout(function(){$(this).removeClass("input_focus");});
		$(".table tr").mouseover(function(){ $(this).addClass("mouseover");}).mouseout(function(){$(this).removeClass("mouseover");	});
	});
</script>

<div class="right">
	<h2>Step <?php echo $step;?> of 5 </h2>
	<h1>服务器信息</h1>	
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
		<tr>
			<th width="300" align="left"><strong>参数</strong></th>
			<th width="424" align="left"><strong>值</strong></th>
		</tr>
		<tr>
				<td><strong>服务器域名/IP地址</strong></td>
				<td><?php echo $name."/".$host; ?></td>
		</tr>
		<tr>
				<td><strong>服务器操作系统</strong></td>
				<td><?php echo $os; ?></td>
		</tr>
		<tr>
				<td><strong>服务器解译引擎</strong></td>
				<td><?php echo $server; ?></td>
		</tr>
		<tr>
				<td><strong>PHP版本</strong></td>
				<td><?php echo $phpv; ?></td>
		</tr>
		<tr>
				<td><strong>安装路径</strong></td>
				<td><?php echo SITEDIR; ?></td>
		</tr>
		<tr>
				<td><strong>脚本超时时间</strong></td>
				<td><?php echo $max_execution_time; ?> 秒</td>
		</tr>

	</table>
	<h1>系统环境要求</h1> 
	
	<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="table">
		<tr>
			<th width="230"><strong>需开启的变量或函数</strong></th>
			<th width="100"><strong>系统要求</strong></th>
			<th width="400"><strong>实际状态及建议</strong></th>
		</tr>
		<tr>
				<td>GD 支持 </td>
				<td>支持</td>
				<td><?php echo $gd; ?></td>
		</tr>
		<tr>
				<td>MySQL 支持</td>
				<td>支持</td>
				<td><?php echo $mysql; ?></td>
		</tr>

		<tr> 
			<td>upload</td>
			<td>支持</td>
			<td><?php echo $uploadSize ?></td>
			</tr>


		<tr>
		  <td>session</td>
		  <td>支持</td>
		  <td><?php echo $session ?></td>
		</tr>


 

	</table>
	<h1>目录权限检测</h1> 
	<div style="margin:10px auto; color:#666;">
	系统要求必须满足下列所有的目录权限全部可读写的需求才能使用。</div>
	
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
		<tr>
			<th width="230"><strong>目录名</strong></th>
			<th width="100"><strong>系统要求</strong></th>
			<th width="400"><strong>实际状态及建议</strong></th>
		</tr>
		<?php
		foreach($folder as $dir)
		{
			$Testdir = SITEDIR.$dir;
			dir_create($Testdir);
			if(TestWrite($Testdir)){
				$w = '<font color=green>[√]写</font>';
			}else{
				$w = '<font color=red>[×]写</font>';
				$err++;
			}
			if(is_readable($Testdir)){
				$r = '<font color=green>[√]读</font>' ;
			}else{
				$r = '<font color=red>[×]读</font>';
				$err++;
			}
		?>
		<tr>
		  <td><?php echo $dir; ?></td>
		  <td>读写</td>
		  <td><?php echo $r." ".$w; ?></td>
		</tr>
		<?php } ?>
	</table>


	<div class="butbox">
		<input type="button" class="inputButton" value=" 上一步 " onclick="history.back();" style="margin-right:20px" />		
		<input type="button" class="inputButton" value=" 下一步 " onclick="window.location.href='index.php?step=3';" <?php if($err>0){ ?> id="nonext"  disabled<?php } ?>  />	
		<input type="button" class="inputButton" value=" 重新检测 " onclick="document.location.reload();" style="margin-left:20px" />
	</div>
</div>


</div>
<div class="power">Powered by <a href="">Yourphp</a></div>
</div></div>
</body>
</html>
